package app.caihan.scframe.util

import com.blankj.utilcode.util.LogUtils
import com.blankj.utilcode.util.NetworkUtils
import com.blankj.utilcode.util.Utils
import org.jetbrains.anko.toast

/**
 * 网络状态监听
 *
 * @author Seven-C
 * @date 2020/7/29
 */
class NetworkStatusChangedL : NetworkUtils.OnNetworkStatusChangedListener {

    override fun onConnected(networkType: NetworkUtils.NetworkType) {
        LogUtils.dTag("xxx","NetworkStatusChangedL networkType.name = ${networkType.name}")
//        Utils.getApp().toast("onConnected: ${networkType.name}")
    }

    override fun onDisconnected() {
        Utils.getApp().toast("网络不给力")
//        LogUtils.dTag("xxx","NetworkStatusChangedL 网络不给力")
    }
}